//
//  WPSearchCasesReadingVC.m
//  wobingwoyi
//
//  Created by WGP on 16/9/29.
//  Copyright © 2016年 WGP. All rights reserved.
//

#import "WPSearchCasesReadingVC.h"
#import "ZNBPresentAnimator.h"
#import "ZNBDismissAnimator.h"

@interface WPSearchCasesReadingVC ()<UIViewControllerTransitioningDelegate>

@property (strong, nonatomic) UIPercentDrivenInteractiveTransition *interactionController;

@end
@implementation WPSearchCasesReadingVC

-(void)viewDidLoad
{
    [super viewDidLoad];
    
    self.transitioningDelegate = self;
}


- (id<UIViewControllerAnimatedTransitioning>)animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source {
    return [ZNBPresentAnimator new];
}

- (id<UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:(UIViewController *)dismissed {
    return [ZNBDismissAnimator new];
}

- (id<UIViewControllerInteractiveTransitioning>)interactionControllerForPresentation:(id<UIViewControllerAnimatedTransitioning>)animator {
    return nil;
}

- (id<UIViewControllerInteractiveTransitioning>)interactionControllerForDismissal:(id<UIViewControllerAnimatedTransitioning>)animator {
    return self.interactionController;
}

- (UIStatusBarStyle)preferredStatusBarStyle {
    return UIStatusBarStyleDefault;
}

-(void)backBtnDidClick
{
    
    if (!self.isBlack)
    {
        [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
    }
    
    [self dismissViewControllerAnimated:YES completion:nil];
}

-(void)dealloc
{
//    NSLog(@"销毁了");
}

@end
